import {http} from './request'
// 轮播图
export const BannerList = ()=>{return http('home/swiperdata')};
// 导航
export const NavList = () => {return http ('home/catitems')};
// 楼层
export const FloorList = () =>{return http ('home/floordata')};
// 分类
export const LeftList = () =>{return http ('categories')};
// 商品搜索
export const getSearch = ( query ) => { return http (`goods/qsearch?query=${query}`,{method:'get'})};
// 商品详情
export const getCateList = (id) => {return http (`goods/detail?goods_id=${id}`,{method:'get'})}
// 商品列表
export const getSearchList = (params) => { return http (`goods/search`,{params})};
// 登录获取token
export const getToken = ( params ) => {return http (`users/wxlogin`,{method:'post',data:params})};
// 生成订单
export const setOrder = ( params ) => { return http (`my/orders/create`,{method:'post',data:params})};
// 生成预支付订单
export const fied = ( params )=>{return http (`my/orders/req_unifiedorder`,{method:'post',data:params})};
// 查看历史订单
export const allOrder = (type)=>{return http(`my/orders/all?type=${type}`,{method:'get'})};
// 搜索列表
export const CateList = (params ) => {return http (`goods/search`,{method:'get',data:params})}
